import vm from '@/main';

const confirmOpts = {
  isLeave: {
    msg: '确定要离开这一页吗？'
  },
  isSave: {
    msg: '是否保存当前修改？',
    opts: {
      confirmButtonText: '是',
      cancelButtonText: '否'
    }
  }
}

const beforeClose = {
  confirm: (resolve, reject) => {
    vm.$confirmBox(() => {
      resolve();
    }, '确定要关闭这一页吗？', () => {
      reject();
    });
  }
}

export { confirmOpts, beforeClose };